// index.js
// const app = getApp()
const { envList } = require('../../envList.js');

Page({
  data: {
    showUploadTip: false,
    informationListEnter: [{
      img: '7274474541_xxlr',
      name: '信息录入',
      link: 'enter',
    }, {
      img: '3325022096_blxc',
      name: '病例查询',
      link: 'search',
    }],
    informationList: [{
      name: '光化性角化肌',
      img: '446728972_001',
      link: 'info',
      code: '001'
    }, {
      name: '基底细胞癌(BCC)',
      img: '6544524332_002',
      link: 'info',
      code: '002'
    }, {
      name: '白色角化病',
      img: '1651281703_003',
      link: 'info',
      code: '003'
    }, {
      name: '皮肤纤维瘤',
      img: '4911567516_004',
      link: 'info',
      code: '004'
    }, {
      name: '黑色素瘤',
      img: '1987141016_005',
      link: 'info',
      code: '005'
    }, {
      name: '黑色素痣',
      img: '489022436_006',
      link: 'info',
      code: '002'
    }, {
      name: '鳞状上皮细胞癌',
      img: '5786433526_007',
      link: 'info',
      code: '007'
    }]
  },
  handleClick (data) {
    const { code, type } = data.currentTarget.dataset;
    console.log('--data', data)
    switch (type) {
      case 'enter':
        wx.navigateTo({
          url: '/pages/healthEnter/index'
        })
        break;
      case 'search':
        wx.navigateTo({
          url: '/pages/profileList/index'
        })
        break;
      case 'info':
        wx.navigateTo({
          url: `/pages/infoDetail/index?code=${code}`
        })
        break;
    }
  },
});
